package com.weilive.core.netty.server;

import org.jboss.netty.channel.ChannelPipeline;
import org.jboss.netty.channel.Channels;

import com.weilive.core.netty.NettyServer;
import com.weilive.core.netty.handler.SimpleProtobufHandler;

public class SimpleProtobufServer  extends NettyServer {

	@Override
	protected ChannelPipeline createPipeline() throws Exception {
		ChannelPipeline pipeline = Channels.pipeline();
		pipeline.addLast("frame-decoder", new SimpleProtobufHandler.ProtobufFrameDecoder());
        pipeline.addLast("decoder", new SimpleProtobufHandler.ProtobufDecoder());
        pipeline.addLast("encoder", new SimpleProtobufHandler.ProtobufEncoder());
        pipeline.addLast("handler", new SimpleProtobufHandler());
        return pipeline;
	}
}